package com.example.demo.Mappers;

import com.example.demo.beans.ZYbrfyHjBean;
import com.example.demo.beans.ZyPatInfoBean;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * Created by Administrator on 2018-05-23.
 */
@Mapper
public interface GetZyPatInfoMapper {
    @Select("  select top 1 Zyno,IsInpatient,Name,Sex,Age,DepName,ZyDate,BedNo from Auto_View_ZYBRXX where CardNo=#{CardNo} or IdCardNO=#{CardNo} or Zyno=#{CardNo}  ")
    ZyPatInfoBean getPatientInfo(@Param("CardNo")String CardNo);
    @Select(" select   (SELECT sum ( yjje )YJJ FROM v_zyb_yjjl zyb_yjjl WITH ( NOLOCK ) WHERE zyh =#{zyh})YJJ  ,(SELECT sum ( fyje )ZFY FROM v_zyb_brfy zyb_brfy WITH ( NOLOCK ) WHERE zyh =#{zyh} AND  yxbz ='1' )ZFY")
    ZYbrfyHjBean getFyhj(@Param("zyh")String zyh);
}
